home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 …ember: Reference Library / Dev.CD Dec 00 RL Disk 1.toast / pc / technical documentation / develop / develop issue 28 / develop issue 28 code / merge tools / macmerge.make < prev    next >
Encoding:
Text File  |  1996-09-25  |  8.2 KB  |  291 lines

  1. #
  2. #    MacMerge.make
  3. #
  4. # Macintosh MPW Makefile for the Eclectus Merge utility
  5. # Copyright (C) 1992-96 Eclectus (D. John Anderson, Alan B. Harper).
  6.  
  7. # This file is part of the Eclectus integration utilities.
  8.  
  9. # Eclectus integration utilities are free software; you can redistribute
  10. # it and/or modify it under the terms of the GNU General Public License
  11. # as published by the Free Software Foundation; either version 1, or
  12. # (at your option) any later version.
  13.  
  14. # Eclectus integration utilities are distributed in the hope that they
  15. # will be useful, but WITHOUT ANY WARRANTY; without even the implied
  16. # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  17. # See the GNU General Public License for more details.
  18.  
  19. # You should have received a copy of the GNU General Public License
  20. # along with the Eclectus integration utilities; see the file COPYING.
  21. # If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge,
  22. # MA 02139, USA.
  23.  
  24. # This make file has the following targets
  25. #
  26. #        Clean:                        Remove all derived files, create directories necessary for other targets below.
  27. #
  28. #        All/<no target>:    Merge and MergeDebug as fat tools*
  29. #        Release:                    Fat Merge
  30. #        PPC:                            PPC only Merge
  31. #        68K:                            68K only Merge
  32. #        Debug                            Fat MergeDebug*
  33. #        DebugPPC:                    PPC only MergeDebug*
  34. #        Debug68K:                    68K only MergeDebug*
  35. #
  36. #        Install:                    Install fat Merge and MergeDebug*
  37. #        InstallRelease:        Install fat Merge*
  38. #        InstallPPC:                Install PPC Merge*
  39. #        Install68K:                Install 68K Merge*
  40. #        InstallDebug:            Install fat MergeDebug*
  41. #        InstallDebugPPC:    Install PPC only MergeDebug*
  42. #        InstallDebug68K:    Install 68K only MergeDebug*
  43. #
  44. #        Test:                            Test Merge
  45. #        TestDebug:                Test MergeDebug*
  46. #
  47. #    *    The code for MergeDebug is not included in the standard distribution, since it is used
  48. #        only to test the code. Write Alan Harper (aharper@dnai.com) if you have a need for this code.
  49. #        Also, the Install... targets place the tools in {MPW}ECTools, which may not be where you
  50. #        want them. Change BIN_DIR to adjust this.
  51.  
  52. MWCPPC_OPTIONS = ∂
  53.     -d DF_MACHINE_MACINTOSH ∂
  54.     -d DF_COMPILER_MW ∂
  55.     -d DF_CHIP_PPC ∂
  56.     -mapcr ∂
  57.     -maxerrors 10 ∂
  58.     -once ∂
  59.     -opt all ∂
  60.     -proto strict ∂
  61.     -r ∂
  62.     -str readonly ∂
  63.     -trigraphs on ∂
  64.     -w full
  65.  
  66.  
  67. MWC68K_OPTIONS = ∂
  68.     -d DF_MACHINE_MACINTOSH ∂
  69.     -d DF_COMPILER_MW ∂
  70.     -d DF_CHIP_68K ∂
  71.     -enum int ∂
  72.     -mapcr ∂
  73.     -maxerrors 10 ∂
  74.     -mbg off ∂
  75.     -mc68020 ∂
  76.     -model codesmart ∂
  77.     -once ∂
  78.     -opt all ∂
  79.     -proto strict ∂
  80.     -r ∂
  81.     -str pool ∂
  82.     -sym off ∂
  83.     -trigraphs on ∂
  84.     -w full
  85.  
  86. ADDL_MWCPPC_OPTIONS = 
  87.  
  88. ADDL_MWC68K_OPTIONS = 
  89.  
  90. MWLINKPPC_OPTIONS = ∂
  91.     -d ∂
  92.     -c 'MPS ' ∂
  93.     -t 'MPST'
  94.  
  95. MWLINK68K_OPTIONS = -mpwtool
  96.  
  97. MWLINKPPC_LIBS = ∂
  98.     "{MWPPCLibraries}"MWMPWCRuntime.Lib ∂
  99.     "{MWPPCLibraries}"'MPW ANSI.C.PPC.Lib' ∂
  100.     "{MWPPCLibraries}"PPCToolLibs.o ∂
  101.     "{SharedLibraries}"InterfaceLib ∂
  102.     "{SharedLibraries}"MathLib 
  103.  
  104. MWLINK68K_LIBS = ∂
  105.     "{MW68KLibraries}"MPWRuntime.68K.lib ∂
  106.     "{MW68KLibraries}"'MPW ANSI (4i/8d) C.68K.Lib' ∂
  107.     "{MW68KLibraries}"'MathLib68K (4i/8d).Lib' ∂
  108.     "{MW68KLibraries}"ToolLibs.o ∂
  109.     "{MW68KLibraries}"MacOS.Lib ∂
  110.  
  111. DERIVED_DIR = :MergeR.i
  112.  
  113. DERIVED_DEBUG_DIR = :MergeD.i
  114.  
  115. TOOL_NAME = Merge
  116.  
  117. DEBUG_TOOL_NAME = MergeDebug
  118.  
  119. INSTALL_AS_NAME = Merge
  120.  
  121. INSTALL_FROM_NAME = Merge
  122.  
  123. BIN_DIR = {MPW}ECTools
  124.  
  125. LOCAL_BIN_DIR = :MacTools
  126.  
  127. MERGE_TO_OBERISH_DIR = ::Oberish
  128.  
  129. H_FILES = ∂
  130.     diff.h
  131.  
  132. MERGE_PPC_OBJS = ∂
  133.     {DERIVED_DIR}:analyze.c.x ∂
  134.     {DERIVED_DIR}:io.c.x ∂
  135.     {DERIVED_DIR}:util.c.x ∂
  136.     {DERIVED_DIR}:Merge.c.x ∂
  137.     {DEBUG_PPC_OBJS}
  138.  
  139. MERGE_68K_OBJS = ∂
  140.     {DERIVED_DIR}:analyze.c.o ∂
  141.     {DERIVED_DIR}:io.c.o ∂
  142.     {DERIVED_DIR}:util.c.o ∂
  143.     {DERIVED_DIR}:Merge.c.o ∂
  144.     {DEBUG_68K_OBJS}
  145.  
  146. DEBUG_PPC_OBJS =
  147.  
  148. DEBUG_68K_OBJS =
  149.  
  150. Release ƒ Merge
  151.  
  152. All ƒ Release Debug
  153.  
  154. PPC ƒ Merge.PPC
  155.  
  156. 68K ƒ Merge.68K
  157.  
  158. Debug ƒ MergeDebug
  159.  
  160. DebugPPC ƒ MergeDebug.PPC
  161.  
  162. Debug68K ƒ MergeDebug.68K
  163.  
  164. Merge ƒ {DERIVED_DIR}:Merge
  165.  
  166. Merge.PPC ƒ {DERIVED_DIR}:Merge.PPC
  167.  
  168. Merge.68K ƒ {DERIVED_DIR}:Merge.68K
  169.  
  170. MergeDebug ƒ 
  171.     Make -f MacMerge.make ∂
  172.         -d DEBUG_PPC_OBJS="{DERIVED_DEBUG_DIR}:DebugMalloc.c.x" ∂
  173.         -d DEBUG_68K_OBJS="{DERIVED_DEBUG_DIR}:DebugMalloc.c.o" ∂
  174.         -d DERIVED_DIR="{DERIVED_DEBUG_DIR}" ∂
  175.         -d ADDL_MWCPPC_OPTIONS="-d DF_DEBUG -i {MERGE_TO_OBERISH_DIR}" ∂
  176.         -d ADDL_MWC68K_OPTIONS="-d DF_DEBUG -i {MERGE_TO_OBERISH_DIR}" ∂
  177.         -d TOOL_NAME={DEBUG_TOOL_NAME} ∂
  178.         {DERIVED_DEBUG_DIR}:{DEBUG_TOOL_NAME}
  179.  
  180. MergeDebug.PPC ƒ
  181.     Make -f MacMerge.make ∂
  182.         -d DEBUG_PPC_OBJS="{DERIVED_DEBUG_DIR}:DebugMalloc.c.x" ∂
  183.         -d DERIVED_DIR="{DERIVED_DEBUG_DIR}" ∂
  184.         -d ADDL_MWCPPC_OPTIONS="-d DF_DEBUG -i {MERGE_TO_OBERISH_DIR}" ∂
  185.         -d TOOL_NAME={DEBUG_TOOL_NAME} ∂
  186.         {DERIVED_DEBUG_DIR}:{DEBUG_TOOL_NAME}.PPC
  187.  
  188. MergeDebug.68K ƒ
  189.     Make -f MacMerge.make ∂
  190.         -d DEBUG_68K_OBJS="{DERIVED_DEBUG_DIR}:DebugMalloc.c.o" ∂
  191.         -d DERIVED_DIR="{DERIVED_DEBUG_DIR}" ∂
  192.         -d ADDL_MWC68K_OPTIONS="-d DF_DEBUG -i {MERGE_TO_OBERISH_DIR}" ∂
  193.         -d TOOL_NAME={DEBUG_TOOL_NAME} ∂
  194.         {DERIVED_DEBUG_DIR}:{DEBUG_TOOL_NAME}.68K
  195.  
  196. {MERGE_PPC_OBJS} ƒ {H_FILES}
  197.  
  198. {MERGE_68K_OBJS} ƒ {H_FILES}
  199.  
  200. {DERIVED_DIR}: ƒ :
  201.  
  202. {DERIVED_DIR}: ƒ {MERGE_TO_OBERISH_DIR}:
  203.  
  204. {DERIVED_DIR}:{TOOL_NAME} ƒ {DERIVED_DIR}:{TOOL_NAME}.PPC {DERIVED_DIR}:{TOOL_NAME}.68K
  205.     Duplicate -y {DERIVED_DIR}:{TOOL_NAME}.PPC {DERIVED_DIR}:{TOOL_NAME}
  206.     Rez -append -o {DERIVED_DIR}:{TOOL_NAME} -d RSRCNAME="∂"{DERIVED_DIR}:{TOOL_NAME}.68K∂"" MacCopyRSRC.r
  207.  
  208. {DERIVED_DIR}:{TOOL_NAME}.PPC ƒ  {MERGE_PPC_OBJS}
  209.     MWLinkPPC {MWLINKPPC_LIBS} {MERGE_PPC_OBJS} {MWLINKPPC_OPTIONS} -o {Targ}
  210.     Rez -d APPNAME=∂"{TOOL_NAME}∂" MacGenericCFRG.r -o {Targ}
  211.  
  212. {DERIVED_DIR}:{TOOL_NAME}.68K ƒ  {MERGE_68K_OBJS}
  213.     MWLink68K {MWLINK68K_LIBS} {MERGE_68K_OBJS} {MWLINK68K_OPTIONS} -o {Targ}
  214.  
  215. Install ƒ InstallRelease InstallDebug
  216.  
  217. InstallRelease ƒ {DERIVED_DIR}:{INSTALL_FROM_NAME}
  218.     If not `Exists {BIN_DIR}:`
  219.         NewFolder {BIN_DIR}:
  220.     End
  221.     Duplicate -y {DERIVED_DIR}:{INSTALL_FROM_NAME} {BIN_DIR}:{INSTALL_AS_NAME}
  222.     If not `Exists {LOCAL_BIN_DIR}:`
  223.         NewFolder {LOCAL_BIN_DIR}:
  224.     End
  225.     Duplicate -y {DERIVED_DIR}:{INSTALL_FROM_NAME} {LOCAL_BIN_DIR}:{INSTALL_AS_NAME}.mpw
  226.  
  227. InstallPPC ƒ
  228.     Make -f MacMerge.make InstallRelease ∂
  229.         -d INSTALL_FROM_NAME="Merge.PPC" ∂
  230.         -d TOOL_NAME="Merge"
  231.  
  232. Install68K ƒ
  233.     Make -f MacMerge.make InstallRelease ∂
  234.         -d INSTALL_FROM_NAME="Merge.68K" ∂
  235.         -d TOOL_NAME="Merge"
  236.  
  237. InstallDebug ƒ
  238.     Make -f MacMerge.make InstallRelease ∂
  239.         -d ADDL_MWCPPC_OPTIONS="-d DF_DEBUG -i {MERGE_TO_OBERISH_DIR}" ∂
  240.         -d ADDL_MWC68K_OPTIONS="-d DF_DEBUG -i {MERGE_TO_OBERISH_DIR}" ∂
  241.         -d DEBUG_PPC_OBJS="{DERIVED_DEBUG_DIR}:DebugMalloc.c.x" ∂
  242.         -d DEBUG_68K_OBJS="{DERIVED_DEBUG_DIR}:DebugMalloc.c.o" ∂
  243.         -d DERIVED_DIR="{DERIVED_DEBUG_DIR}" ∂
  244.         -d INSTALL_FROM_NAME="MergeDebug" ∂
  245.         -d INSTALL_AS_NAME="MergeDebug" ∂
  246.         -d TOOL_NAME="MergeDebug"
  247.  
  248. InstallDebugPPC ƒ
  249.     Make -f MacMerge.make InstallRelease ∂
  250.         -d ADDL_MWCPPC_OPTIONS="-d DF_DEBUG -i {MERGE_TO_OBERISH_DIR}" ∂
  251.         -d DEBUG_PPC_OBJS="{DERIVED_DEBUG_DIR}:DebugMalloc.c.x" ∂
  252.         -d DERIVED_DIR="{DERIVED_DEBUG_DIR}" ∂
  253.         -d INSTALL_FROM_NAME="MergeDebug.PPC" ∂
  254.         -d INSTALL_AS_NAME="MergeDebug" ∂
  255.         -d TOOL_NAME="MergeDebug"
  256.  
  257. InstallDebug68K ƒ
  258.     Make -f MacMerge.make InstallRelease ∂
  259.         -d ADDL_MWC68K_OPTIONS="-d DF_DEBUG -i {MERGE_TO_OBERISH_DIR}" ∂
  260.         -d DEBUG_68K_OBJS="{DERIVED_DEBUG_DIR}:DebugMalloc.c.o" ∂
  261.         -d DERIVED_DIR="{DERIVED_DEBUG_DIR}" ∂
  262.         -d INSTALL_FROM_NAME="MergeDebug.68K" ∂
  263.         -d INSTALL_AS_NAME="MergeDebug" ∂
  264.         -d TOOL_NAME="MergeDebug"
  265.  
  266. Clean ƒ
  267.     Delete -y -i {DERIVED_DIR}
  268.     NewFolder {DERIVED_DIR}
  269.     Delete -y -i {DERIVED_DEBUG_DIR}
  270.     NewFolder {DERIVED_DEBUG_DIR}
  271.  
  272. Test ƒ
  273.     Merge testfile0 testfile1 testfile2 testfile3 testfile4 {DERIVED_DIR}:testfile.out > Dev:Stderr
  274.     compare {DERIVED_DIR}:!testfile.out testfile.merge > Dev:Stderr
  275.     Delete -i -y {DERIVED_DIR}:testd.out
  276.     Merge :testd0 :testd1 :testd2 :testd3 :testd4 {DERIVED_DIR}:testd.out > Dev:Stderr
  277.     Difference {DERIVED_DIR}:testd.out :testd.mac.merge >{DERIVED_DIR}:testd.check
  278.  
  279. TestDebug ƒ
  280.     MergeDebug -x -X testfile0 testfile1 testfile2 testfile3 testfile4 {DERIVED_DIR}:testfile.out > Dev:Stderr
  281.     Compare {DERIVED_DIR}:!testfile.out testfile.merge > Dev:Stderr
  282.     Delete -i -y {DERIVED_DIR}:testd.out
  283.     MergeDebug -x -X :testd0 :testd1 :testd2 :testd3 :testd4 {DERIVED_DIR}:testd.out > Dev:Stderr
  284.     DifferenceDebug {DERIVED_DIR}:testd.out :testd.mac.merge >{DERIVED_DIR}:testd.check
  285.  
  286. .c.x ƒ .c
  287.     MWCPPC {DepDir}{Default}.c {MWCPPC_OPTIONS} {ADDL_MWCPPC_OPTIONS} -o {Targ}
  288.  
  289. .c.o ƒ .c
  290.     MWC68K {DepDir}{Default}.c {MWC68K_OPTIONS} {ADDL_MWC68K_OPTIONS} -o {Targ}
  291.